package com.lh.learning.mq.rabbitmq;


import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.apache.rocketmq.spring.core.RocketMQReplyListener;
import org.springframework.stereotype.Component;

@Component
@RocketMQMessageListener(topic = "topic-2", consumerGroup = "consumer-group-2")
public class RocketMqConsumer2 implements RocketMQReplyListener<String,String> {

    @Override
    public String onMessage(String message) {
        System.out.println("消费者2接收到消息:" + message);
        return "world";
    }
}
